<?php

$form = $this->form;
$form->setAttribute('action', $this->url('admin/child', array('controller'=>'topic','action' => 'add')));
$form->prepare();

$userID = $this->userID;

?>
<div class="row-fluid sortable ui-sortable">
    <div class="box span12">
        <div class="box-header well">
            <div class="box-icon">
                <a href="<?php echo $this->url('admin/child', array('controller'=>'topic','action'=>'add')) ?>" class="btn btn-setting btn-round"><i class="icon16  icon-add"></i></a>
                <a href="<?php echo $this->url('admin/child', array('controller'=>'topic','action'=>'index')) ?>" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
            </div>
        </div>
        <div class="box-content">
            <legend>Add New Topic</legend>
            <?php
            echo $this->form()->openTag($form);

            echo $this->formHidden($form->get('id'));
            echo '<div class="control-group" >';
            echo $this->formRow($form->get('create_date')->setValue(date("Y-m-d H:i:s")));
            echo '<div class="controls">';
            echo $this->formRow($form->get('user_id')->setValue($userID));
            echo '</div>';
            echo '</div>';
            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Title</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('title'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Short Description</label>';
            echo '<div class="controls">';

            echo $this->formRow($form->get('short_description'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Full Description</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('full_description'));
            echo '</div>';
            echo '</div>';



            echo '<div class="control-group">';
            echo '<label class="control-label" for="typeahead">Images</label>';
            echo '<div class="controls" >';
            echo $this->formRow($form->get('images'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group">';
            echo '<label class="control-label" for="typeahead">Cần bán | Mua</label>';
            echo '<div class="controls" >';
            echo $this->formRow($form->get('topic_type'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group">';
            echo '<label class="control-label" for="typeahead">Địa điểm</label>';
            echo '<div class="controls" >';
            echo $this->formRow($form->get('topic_location'));
            echo '</div>';
            echo '</div>';


            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Price </label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('price'));
            echo '</div>';
            echo '</div>';




            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Show Price </label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('show_price'));
            echo '</div>';
            echo '</div>';



            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Expire Date</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('expire_date'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Status</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('status'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Categories</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('cat_id'));
            echo '</div>';
            echo '</div>';

            //--------------------------------------------------------
            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Is BrandNew?</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('is_brandnew'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Thumb</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('thumb'));
            echo '</div>';
            echo '</div>';

            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Topic Up date</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('up_date'));
            echo '</div>';
            echo '</div>';


            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Slug</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('slug'));
            echo '</div>';
            echo '</div>';


            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Viewed</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('viewed'));
            echo '</div>';
            echo '</div>';


            echo '<div class="control-group" >';
            echo '<label class="control-label" for="typeahead">Is Public?</label>';
            echo '<div class="controls">';
            echo $this->formRow($form->get('is_public'));
            echo '</div>';
            echo '</div>';



            echo '<div class="form-actions" >';
            echo '<div class="">';

            echo $this->formSubmit($form->get('submit'));
            echo '</div>';
            echo '</div>';

            echo $this->form()->closeTag();
            ?>
        </div>
    </div>
</div>